.nav{
    background-color: #eee;width: 600px;height: 40px;margin: 0 auto;
}
*{margin: 0px;padding: 0px;}
ul{list-style: none; }
ul li {float: left;line-height: 40px;text-align: center;position: relative;}
a{text-decoration: none;color: #000;display: block;padding: 0 10px;}
a:hover{background-color: #666;color: #eee;}

ul li ul li{float: none;background-color: #eee;margin-top: 2px;display: block;}
ul li ul{position: absolute;left:0px;top:40px;display: none;}
ul li ul li a:hover{background-color: #7B68EE;}
ul li:hover ul{display: block;}